-
Notifications
You must be signed in to change notification settings - Fork 20
Added tileLevelMin/Max and colormap details to STAC xcube:data_vars #940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…C xcube:data_vars
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @edd3x, thanks for the PR. The extension to data variables is very useful and code looks good!
In fact, we plan to deprecate the /datasets endpoint and use only STAC. Then, I'm sure we'll need to enrich the data variable object by even more information. To be compatible with such an extension, we might put the extra information into a dedicated object, either as an object in attrs or as new own property extra or similar. We'll let you know here asap. Stay tuned and thanks!
|
Hey @edd3x, FYI, we haven't started the activity yet, but it is still on the roadmap for spring 2024. |
[Description of PR]
Currently, our web visualisation development team have been using the
/datasetsendpoint from the xcube server API which providestileLevelMin,tileLevelMax,colorBarName,colorBarMaxandcolorBarMinper data variable as part of the JSON output. We are however changing toows.stacvia the/ogcendpoint because it's faster, but the STAC JSON output does not provide the above-listed attributes.What I have done here is to use the
DatasetsContextto derive the tiling scheme and get the colormap details usingderive_tiling_scheme()andget_color_mapping()inxcube/webapi/ows/stac/controllers.pyso thexcube:data_varsin the STAC item JSON output will return the additional variables liketileLevelMin,tileLevelMax,colorBarName,colorBarMaxandcolorBarMin.I created a new method
_get_xc_data_variablesand_get_xc_data_variableto return thexcube:data_vars.Checklist:
xcube/webapi/ows/stac/controllers.pyCHANGES.md